package com.tianji.learning.service;

import com.tianji.api.dto.trade.OrderBasicDTO;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.dto.LearningPlanDTO;
import com.tianji.learning.domain.dto.LearningPlanPageVO;
import com.tianji.learning.domain.po.LearningLesson;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.domain.vo.LearningLessonVO;

import java.util.List;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author WFan
 * @since 2025-03-22
 */
public interface ILearningLessonService extends IService<LearningLesson> {
    /**
     * 添加课表
     * @param orderBasicDTO
     */
    void add(OrderBasicDTO orderBasicDTO);

    /**
     * 课程列表查询
     * @return
     */
    PageDTO<LearningLessonVO> lesesonsListQuery(PageQuery pageQuery);

    /**
     * 查询最近学习课程
     * @return
     */
    LearningLessonVO nowLearningLesson();

    /**
     * 删除课程表
     * @param orderBasicDTO
     */
    void delete(OrderBasicDTO orderBasicDTO);

    /**
     * 根据课程id删除课程表
     * @param courseId
     */
    void deleteLessonCourseId(Long courseId);

    /**
     * 检查课程是否有效
     * @param courseId
     * @return
     */
    Long checkLessonValid(Long courseId);

    /**
     * 查询课表中指定课程状态
     * @param courseId
     * @return
     */
    LearningLessonVO checkLessonStatus(Long courseId);

    /**
     * 统计课程的学习人数
     * @param courseId
     * @return
     */
    Integer countLearningLessonByCourse(Long courseId);

    /**
     * 创建/修改 学习计划
     * @param learningPlanDTO
     */
    void addLearningPlan(LearningPlanDTO learningPlanDTO);

    /**
     *
     * @param pageQuery
     * @return
     */
    LearningPlanPageVO queryLearningPlan(PageQuery pageQuery);
}
